#include <header.h>

int main(){
    char *port = "8080";
    char *ip = "192.168.233.128";
    int socket_fd = socket(AF_INET,SOCK_STREAM,0);
    struct sockaddr_in sockaddr;
    sockaddr.sin_family = AF_INET;
    sockaddr.sin_port = htons(atoi(port));
    sockaddr.sin_addr.s_addr = inet_addr(ip);

    bind(socket_fd,(struct sockaddr*)&sockaddr,sizeof(sockaddr));
    listen(socket_fd,10);

    int nat_fd = accept(socket_fd,NULL,NULL);

    char buf[100] = {0};
    recv(nat_fd,buf,sizeof(buf),0);

    printf("buf1: %s \n",buf);

    close(socket_fd);
    close(nat_fd);

    return 0;
}

